<?php

namespace App\Models;


use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\data_time;
class time_slot extends Model
{
    //排班表
    use HasFactory;
    protected $table='med_time_slot';
    protected $primaryKey='time_id';
    protected $fillable=['time_id','one_up','one_down','two_up','two_down',
        'three_up','three_down','four_up','four_down',
        'five_up','five_down','six_up','six_down','seven_up','seven_down','number'];

    public function one_up()
    {
        return $this->hasMany(data_time::class,'sign','one_up');
    }

    public function two_up()
    {
        return $this->hasMany(data_time::class,'sign','two_up');
    }

    public function three_up()
    {
        return $this->hasMany(data_time::class,'sign','three_up');
    }

    public function four_up()
    {
        return $this->hasMany(data_time::class,'sign','four_up');
    }

    public function five_up()
    {
        return $this->hasMany(data_time::class,'sign','five_up');
    }

    public function six_up()
    {
        return $this->hasMany(data_time::class,'sign','six_up');
    }

    public function seven_up()
    {
        return $this->hasMany(data_time::class,'sign','seven_up');
    }
    public function one_down()
    {
        return $this->hasMany(data_time::class,'sign','one_down');
    }

    public function two_down()
    {
        return $this->hasMany(data_time::class,'sign','two_down');
    }

    public function three_down()
    {
        return $this->hasMany(data_time::class,'sign','three_down');
    }

    public function four_down()
    {
        return $this->hasMany(data_time::class,'sign','four_down');
    }

    public function five_down()
    {
        return $this->hasMany(data_time::class,'sign','five_down');
    }

    public function six_down()
    {
        return $this->hasMany(data_time::class,'sign','six_down');
    }

    public function seven_down()
    {
        return $this->hasMany(data_time::class,'sign','seven_down');
    }



}
